package com.yanqu.road.entity.activity.xiayue;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.utils.property.Property;

import java.util.ArrayList;
import java.util.List;

@FieldTypeAnnotation(tableName = "t_u_activity_xiayue_user_data")
public class XiaYueUserData extends DataObject {

    @FieldTypeAnnotation(desc = "活动ID", select = true, update = true)
    private int activityId;
    @FieldTypeAnnotation(desc = "用户ID", select = true, update = true)
    private long userId;
    @FieldTypeAnnotation(desc = "积分")
    private int score;
    @FieldTypeAnnotation(desc = "已有动物")
    private Property animalProp = new Property();
    @FieldTypeAnnotation(desc = "NPC列表")
    private List<Integer> npcList = new ArrayList<>();
    @FieldTypeAnnotation(desc = "没中保底动物次数")
    private int commonTimes;
    @FieldTypeAnnotation(desc = "当前地点")
    private int curPlace;

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        if (this.score != score) {
            this.score = score;
            setOp(DataStatus.Update);
        }
    }

    public Property getAnimalProp() {
        return animalProp;
    }

    public void setAnimalProp(Property animalProp) {
        if (null == animalProp) {
            return;
        }
        this.animalProp = animalProp;
        setOp(DataStatus.Update);
    }

    public List<Integer> getNpcList() {
        return npcList;
    }

    public void setNpcList(List<Integer> npcList) {
        if (null == npcList) {
            return;
        }
        this.npcList = npcList;
        setOp(DataStatus.Update);
    }

    public int getCommonTimes() {
        return commonTimes;
    }

    public void setCommonTimes(int commonTimes) {
        if (this.commonTimes != commonTimes) {
            this.commonTimes = commonTimes;
            setOp(DataStatus.Update);
        }
    }

    public int getCurPlace() {
        return curPlace;
    }

    public void setCurPlace(int curPlace) {
        if (this.curPlace != curPlace) {
            this.curPlace = curPlace;
            setOp(DataStatus.Update);
        }
    }
}
